<template>
  <div id="app">
    <!--头部区域 -->
    <div style="height: 60px; line-height: 60px; background-color: white; margin-bottom: 2px">
    <img src="@/assets/logo.png" style="width: 40px; position: relative; top: 10px;left: 20px">
      <span style="margin-left: 35px;font-size: 24px">图书管理系统</span>
    </div>
    <!--头部区域End -->


    <!--侧边栏和主体 -->
    <div style="display: flex">

      <!--侧边栏 -->
      <div style="width: 200px; min-height: calc(100vh - 62px); overflow: hidden; margin-right: 2px; background-color: white">
        <el-menu :default-active="$route.path" router class="el-menu-demo">
          <el-menu-item index="/">
            <i class="el-icon-s-management"></i>  <!--图标可以在elm ui中直接替换 -->
            <span>首页</span>
          </el-menu-item>
          <el-submenu index="">
            <template slot="title">
              <i class="el-icon-s-order"></i>
              <span>关于页面</span>
            </template>
            <el-menu-item index="/about">关于详情</el-menu-item>
          </el-submenu>
        </el-menu>
      </div>
      <!--侧边栏End -->

      <!--主体 -->
      <div style="flex: 1; background-color: white; padding: 10px">
        <router-view/>  <!--组件路由-->
      </div>
      <!--主体End -->

    </div>
    <!--侧边栏和主体End -->
  </div>
</template>

